package com.guigu.chenjiajun.controller;

import com.guigu.chenjiajun.service.ProductionAuditService;
import com.guigu.common.pojo.MApply;
import com.guigu.common.vo.SearchVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/ProductionAudit")
public class ProductionAuditController {

    @Resource
    private ProductionAuditService productionAuditService;

    @RequestMapping("/queryMApply")
    @ResponseBody
    public SearchVo<MApply> queryMApply(@RequestBody SearchVo searchVo){
        return this.productionAuditService.queryMApply(searchVo);
    }
    @RequestMapping("/showAuditMApply")
    @ResponseBody
    public List<MApply> showAuditMApply(String id){
        return this.productionAuditService.showAuditMApply(id);
    }
    @RequestMapping("/audit")
    @ResponseBody
    public int audit(@RequestBody MApply mApply){
        return this.productionAuditService.audit(mApply);
    }
}
